<?php


namespace App\Exceptions;


use Closure;
use Dcat\Admin\Grid\Displayers\Actions;

class Grid extends \Dcat\Admin\Grid
{
    public function __construct($repository = null, ?Closure $builder = null, $request = null)
    {
        parent::__construct($repository, $builder, $request);
        $this->actions(function (Actions $actions){
            $actions->disableView();
        });
        $this->model()->orderBy('id','desc');
        $this->showColumnSelector();
    }

    public function enableDialogCreate()
    {
        $this->showQuickEditButton();
        $this->disableEditButton();
        return parent::enableDialogCreate();
    }
}
